import request from '@/utils/request';

/**
 * 获取绩效考核列表
 */
export const getAssessmentList_API = async (params: any) => await request.post('/api/getAssessmentList', params);

/**
 * 获取绩效考核详情
 */
export const getAssessmentDetail_API = async (params: any) => await request.get(`/api/getAssessmentDetail/${params.assessmentId}`);

/**
 * 添加绩效考核（仅管理员）
 */
export const addAssessment_API = async (params: any) => await request.post('/api/addAssessment', params);

/**
 * 删除绩效考核（仅管理员）
 */
export const deleteAssessment_API = async (params: any) => await request.delete(`/api/deleteAssessment/${params.assessmentId}`);

/**
 * 修改绩效考核（仅管理员）
 */
export const updateAssessment_API = async (params: any) => await request.put(`/api/updateAssessment/${params.assessmentId}`, params);


export default {
  getAssessmentList_API,
  getAssessmentDetail_API,
  addAssessment_API,
  deleteAssessment_API,
  updateAssessment_API
}